import 'package:shared_preferences/shared_preferences.dart';
// 存
setStorage(key,value) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.setString(key, value);
}
// 取
Future<String> getStorage(key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  return prefs.getString(key);
}
// 删除
delStorage(key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.remove(key);
}

// 清空
clearStorage(key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.clear();
}